﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using EFFC.Net.Resource;
using EFFC.Net.Data.Base;
using EFFC.Net.Common;

namespace EFFC.Net.WebBuilder.Public
{
    public class WebConfigString
    {
        /// <summary>
        /// 標籤列印模板
        /// </summary>
        public static string PrintLabelTemplate
        {
            get { return MyConfig.GetConfiguration("PrintLabelTemplate"); }
        }

        /// <summary>
        /// 指定的打印機
        /// </summary>
        public static string DefaultPrinterName
        {
            get { return MyConfig.GetConfiguration("DefaultPrinterName"); }
        }

        /// <summary>
        /// call_center_serial_no
        /// </summary>
        public static string call_center_serial_no
        {
            get { return MyConfig.GetConfiguration("call_center_serial_no"); }
        }

        /// <summary>
        /// DB連接串
        /// </summary>
        public static string DBConn
        {
            get { return MyConfig.GetWebDBConnStringByEncrypt("dbConn"); }
        }
        /// <summary>
        /// ldap開關
        /// </summary>
        public static bool LdapSwitch
        {
            get { return bool.Parse(MyConfig.GetConfiguration("LdapSwitch")); }
        }

        /// <summary>
        /// LDAP_User
        /// </summary>
        public static string LDAP_User
        {
            get { return MyConfig.GetConfiguration("LDAP_User"); }
        }

        /// <summary>
        /// 每頁顯示最大資料筆數
        /// </summary>
        public static int PageSize
        {
            get { return GlobalCommon.PageSize; }
        }

        public static bool DebugMode
        {
            get { return bool.Parse(MyConfig.GetConfiguration("DebugMode")); }
        }
        /// <summary>
        /// 文件資料上傳后存放的路徑
        /// </summary>
        public static string UpLoadFilePath
        {
            get { return MyConfig.GetConfiguration("UpLoadFilePath"); }
        }
        /// <summary>
        /// 文件資料上傳后備份文件存放的路徑，該參數屬於SHS項目特有的
        /// </summary>
        public static string UpLoadFileBackUpPath
        {
            get { return MyConfig.GetConfiguration("UpLoadFileBackUp"); }
        }
        /// <summary>
        /// Ldap服务器ip地址
        /// </summary>
        public static string LDAP_IP
        {
            get { return MyConfig.GetConfiguration("LDAP_IP"); }
        }
        /// <summary>
        /// Ldap服务器端口
        /// </summary>
        public static string LDAP_PORT
        {
            get { return MyConfig.GetConfiguration("LDAP_PORT"); }
        }
        /// <summary>
        /// LDAP_OU
        /// </summary>
        public static string LDAP_OU
        {
            get { return MyConfig.GetConfiguration("LDAP_OU"); }
        }
        /// <summary>
        /// LDAP_sScope
        /// </summary>
        public static string LDAP_sScope
        {
            get { return MyConfig.GetConfiguration("LDAP_sScope"); }
        }
        /// <summary>
        /// LDAP_BaseDN
        /// </summary>
        public static string LDAP_BaseDN
        {
            get { return MyConfig.GetConfiguration("LDAP_BaseDN"); }
        }
        /// <summary>
        /// LDAP_Username
        /// </summary>
        public static string LDAP_Username
        {
            get { return MyConfig.GetConfiguration("LDAP_Username"); }
        }
        /// <summary>
        /// LDAP_Password
        /// </summary>
        public static string LDAP_Password
        {
            get { return MyConfig.GetConfigurationByEncrypt("LDAP_Password"); }
        }
    }
}
